#include <basic_types.h>
#include <sys_config.h>

//#define SUPPORT_PACKET_26

#if	defined(TTX_G3_SUPPORT)

static const UINT32 TTX_G3_Font[][96][9] = 
{
	//G3 Mosaics set, 0x20~0x7f maps to 0x20~0x7f
		{
			{0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0c003000, 0xf003c00f, 0xc03f0000},//0x20
			{0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0f003c00, 0xfe03f80f, 0xfe3ff800},//0x21
			{0x00000000, 0x00000000, 0x00000000, 0x00008002, 0x000c0030, 0x00f003c0, 0x0f803e00, 0xfc03f00f, 0xe03f8000},//0x22
			{0x00000000, 0x00000000, 0x00000000, 0x0000c003, 0x000f803e, 0x00fe03f8, 0x0ff03fc0, 0xffc3ff0f, 0xff3ffc00},//0x23
			{0x00000008, 0x00200080, 0x02000c00, 0x3000f003, 0xc00f003c, 0x00f803e0, 0x0f803e00, 0xfc03f00f, 0xe03f8000},//0x24
			{0x8002000c, 0x003000f0, 0x03c00f80, 0x3e00fc03, 0xf00ff03f, 0xc0ff03fc, 0x0ffc3ff0, 0xffe3ff8f, 0xff3ffc00},//0x25
			{0x03f80fe1, 0xff87fe7f, 0xf9ffefff, 0xbffefffb, 0xffefffbf, 0xfefffbff, 0xefffbffe, 0xfffbffef, 0xffbffe00},//0x26
			{0x00180060, 0x1f807e1f, 0xf87fefff, 0xbffefffb, 0xffefffbf, 0xfefffbff, 0xefffbffe, 0xfffbffef, 0xffbffe00},//0x27
			{0x01f807e0, 0x3f80fe07, 0xf81fe1ff, 0x87fe3ff8, 0xffe7ff9f, 0xfefffbff, 0xefffbffe, 0xfffbffef, 0xffbffe00},//0x28
			{0x00080020, 0x07801e00, 0xf803e01f, 0x807e07f8, 0x1fe3ff8f, 0xfefffbff, 0xefffbffe, 0xfffbffef, 0xffbffe00},//0x29
			{0x01f807e0, 0x3f80fe03, 0xf80fe07f, 0x81fe1ff8, 0x7fe1ff87, 0xfe3ff8ff, 0xe3ff8ffe, 0x7ff9ffef, 0xffbffe00},//0x2a
			{0x00000000, 0x00000000, 0x00000000, 0x800200f8, 0x03e07f81, 0xfe7ff9ff, 0xefffbffe, 0xfffbffef, 0xffbffe00},//0x2b
			{0x7ff9ffe3, 0xff8ffe1f, 0xf87fe07f, 0x81fe03f8, 0x0fe03f80, 0xfe07f81f, 0xe1ff87fe, 0x3ff8ffe7, 0xff9ffe00},//0x2c
			{0x800a002c, 0x01b006f0, 0x7bc1ef8f, 0xbe3efcfb, 0xf3efffbf, 0xfefffbff, 0xefffbffe, 0xfffbffef, 0xffbffe00},//0x2d
			{0x3800e003, 0x800e0038, 0x00e00380, 0x0e003800, 0xe003800e, 0x003800e0, 0x03800e00, 0x3800e003, 0x800e0000},//0x2e
			{0xc6e31b83, 0x918e46c6, 0xe31b8391, 0x8e46c6e3, 0x1b83918e, 0x46c6e31b, 0x83918e46, 0xc6e31b83, 0x918e4600},//0x2f
			{0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00018006, 0x007801e0, 0x0f803e00},//0x30
			{0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0007801e, 0x01f807e3, 0xff8ffe00},//0x31
			{0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00200180, 0x06007801, 0xe00f803e, 0x00f803e0, 0x1f807e00},//0x32
			{0x00000000, 0x00000000, 0x00000000, 0x00000018, 0x00600f80, 0x3e01f807, 0xe07f81fe, 0x1ff87fe7, 0xff9ffe00},//0x33
			{0x00000000, 0x00800200, 0x08002001, 0x80060078, 0x01e00780, 0x1e00f803, 0xe00f803e, 0x00f803e0, 0x1f807e00},//0x34
			{0x00080020, 0x01800600, 0x7801e00f, 0x803e00f8, 0x03e07f81, 0xfe07f81f, 0xe1ff87fe, 0x3ff8ffe7, 0xff9ffe00},//0x35
			{0xff03fc0f, 0xfc3ff0ff, 0xf3ffcfff, 0xbffefffb, 0xffefffbf, 0xfefffbff, 0xefffbffe, 0xfffbffef, 0xffbffe00},//0x36
			{0xc003000f, 0xe03f80ff, 0xc3ff0fff, 0xbffefffb, 0xffefffbf, 0xfefffbff, 0xefffbffe, 0xfffbffef, 0xffbffe00},//0x37
			{0xfe03f80f, 0xf03fc0ff, 0x03fc0ffc, 0x3ff0ffe3, 0xff8fff3f, 0xfcfffbff, 0xefffbffe, 0xfffbffef, 0xffbffe00},//0x38
			{0x8002000f, 0x003c00fc, 0x03f00fe0, 0x3f80ff03, 0xfc0ffe3f, 0xf8fffbff, 0xefffbffe, 0xfffbffef, 0xffbffe00},//0x39
			{0xfe03f80f, 0xf03fc0ff, 0x03fc0ff0, 0x3fc0ffc3, 0xff0ffc3f, 0xf0ffe3ff, 0x8ffe3ff8, 0xfff3ffcf, 0xffbffe00},//0x3a
			{0x00000000, 0x00000000, 0x00000800, 0x2000f803, 0xe00ff03f, 0xc0fff3ff, 0xcfffbffe, 0xfffbffef, 0xffbffe00},//0x3b
			{0xfff3ffcf, 0xfe3ff8ff, 0xc3ff0ff0, 0x3fc0ff03, 0xfc0ff03f, 0xc0ff03fc, 0x0ffc3ff0, 0xffe3ff8f, 0xff3ffc00},//0x3c
			{0xfffbffef, 0xffbffeff, 0xfbffefff, 0xbffefffb, 0xffefcfbf, 0x3ef8fbe3, 0xef07bc1e, 0xc01b0068, 0x00a00200},//0x3d
			{0x007001c0, 0x07001c00, 0x7001c007, 0x001c0070, 0x01c00700, 0x1c007001, 0xc007001c, 0x007001c0, 0x07001c00},//0x3e
			{0xfffbffef, 0xffbffeff, 0xfbffefff, 0xbffefffb, 0xffefffbf, 0xfefffbff, 0xefffbffe, 0xfffbffef, 0xffbffe00},//0x3f
			{0x03000c00, 0x3000c003, 0x000c0fff, 0xbffefffb, 0xffefffbf, 0xfefffbff, 0xe0000000, 0x00000000, 0x00000000},//0x40
			{0x00000000, 0x00000000, 0x00000fff, 0xbffefffb, 0xffefffbf, 0xfefffbff, 0xe03000c0, 0x03000c00, 0x3000c000},//0x41
			{0x03000c00, 0x3000c003, 0x000c003f, 0x80fe03f8, 0x0fe03f80, 0xfe03f80f, 0xe03000c0, 0x03000c00, 0x3000c000},//0x42
			{0x03000c00, 0x3000c003, 0x000c0ff0, 0x3fc0ff03, 0xfc0ff03f, 0xc0ff03fc, 0x003000c0, 0x03000c00, 0x3000c000},//0x43
			{0x07001c00, 0xc0030038, 0x00e00700, 0x1c00e003, 0x800e0038, 0x007001c0, 0x03800e00, 0x0c003000, 0x7001c000},//0x44
			{0x03800e00, 0x0c003000, 0xe0038003, 0x800e0018, 0x00600180, 0x06003800, 0xe00e0038, 0x00c00300, 0x3800e000},//0x45
			{0x00000000, 0x00000000, 0x00000000, 0x0000800a, 0x002e01b8, 0x067039c0, 0xe38e0e38, 0x0cc03300, 0x7801e000},//0x46
			{0x07801e00, 0xcc033038, 0xe0e38703, 0x9c0ee01b, 0x806800a0, 0x02000000, 0x00000000, 0x00000000, 0x00000000},//0x47
			{0x0f003c01, 0xc0070038, 0x01e00e00, 0x3800c003, 0x00080020, 0x00000000, 0x00000000, 0x00000000, 0x00000000},//0x48
			{0x03800e00, 0x0c003000, 0xe003c003, 0x800e0018, 0x00600080, 0x02000000, 0x00000000, 0x00000000, 0x00000000},//0x49
			{0x00000000, 0x00000000, 0x00000000, 0x00008002, 0x000c0030, 0x00e00180, 0x07800e00, 0x1c007000, 0xf003c000},//0x4a
			{0x00000000, 0x00000000, 0x00000000, 0x00000008, 0x00200180, 0x06003800, 0xc00f0038, 0x00c00300, 0x3800e000},//0x4b
			{0x03000c00, 0x3000c003, 0x000c0fff, 0xbffefffb, 0xffefffbf, 0xfefffbff, 0xe03000c0, 0x03000c00, 0x3000c000},//0x4c
			{0x00000000, 0x00000000, 0x000000f8, 0x03e01fc0, 0x7f01fc07, 0xf00f803e, 0x00000000, 0x00000000, 0x00000000},//0x4d
			{0x00000000, 0xf803e07f, 0xf1ffcfff, 0xbffefffb, 0xffefffbf, 0xfefffbff, 0xe7ff1ffc, 0x0f803e00, 0x00000000},//0x4e
			{0x00000001, 0xfc07f078, 0xf3e3ee03, 0xb80ee03b, 0x80ee03b8, 0x0ee03b80, 0xef8f9e3c, 0x1fc07f00, 0x00000000},//0x4f
			{0x03000c00, 0x3000c003, 0x000c0030, 0x00c00300, 0x0c003000, 0xc003000c, 0x003000c0, 0x03000c00, 0x3000c000},//0x50
			{0x00000000, 0x00000000, 0x00000000, 0x0000fffb, 0xffefffbf, 0xfe000000, 0x00000000, 0x00000000, 0x00000000},//0x51
			{0x00000000, 0x00000000, 0x00000000, 0x000003f8, 0x0fe03f80, 0xfe03000c, 0x003000c0, 0x03000c00, 0x3000c000},//0x52
			{0x00000000, 0x00000000, 0x00000000, 0x0000ff03, 0xfc0ff03f, 0xc003000c, 0x003000c0, 0x03000c00, 0x3000c000},//0x53
			{0x03000c00, 0x3000c003, 0x000c0030, 0x00c003f8, 0x0fe03f80, 0xfe000000, 0x00000000, 0x00000000, 0x00000000},//0x54
			{0x03000c00, 0x3000c003, 0x000c0030, 0x00c0ff03, 0xfc0ff03f, 0xc0000000, 0x00000000, 0x00000000, 0x00000000},//0x55
			{0x03000c00, 0x3000c003, 0x000c0030, 0x00c003f8, 0x0fe03f80, 0xfe03000c, 0x003000c0, 0x03000c00, 0x3000c000},//0x56
			{0x03000c00, 0x3000c003, 0x000c0030, 0x00c0ff03, 0xfc0ff03f, 0xc003000c, 0x003000c0, 0x03000c00, 0x3000c000},//0x57
			{0x00000000, 0x00000000, 0x00000000, 0x0000fffb, 0xffefffbf, 0xfe03000c, 0x003000c0, 0x03000c00, 0x3000c000},//0x58
			{0x03000c00, 0x3000c003, 0x000c0030, 0x00c0fffb, 0xffefffbf, 0xfe000000, 0x00000000, 0x00000000, 0x00000000},//0x59
			{0x03000c00, 0x3000c003, 0x000c0030, 0x00c0fffb, 0xffefffbf, 0xfe03000c, 0x003000c0, 0x03000c00, 0x3000c000},//0x5a
			{0x00000000, 0x0000000e, 0x003800f0, 0x03c0ffe3, 0xff8ffe3f, 0xf80f003c, 0x00e00380, 0x00000000, 0x00000000},//0x5b
			{0x00000000, 0x00000001, 0x80060078, 0x01e03ff8, 0xffe3ff8f, 0xfe07801e, 0x00180060, 0x00000000, 0x00000000},//0x5c
			{0x00000000, 0x3000c007, 0x801e01fe, 0x07f83ff0, 0xffc03000, 0xc003000c, 0x003000c0, 0x03000c00, 0x3000c000},//0x5d
			{0x03000c00, 0x3000c003, 0x000c0030, 0x00c00300, 0x0c03ff0f, 0xfc1fe07f, 0x807801e0, 0x03000c00, 0x00000000},//0x5e
			{0x00000000, 0x00000000, 0x00000094, 0x02d00940, 0x25009402, 0x50084000, 0x00000000, 0x00000000, 0x00000000},//0x5f
			{0xfffbffef, 0xffbffeff, 0xfbffefff, 0xbffefffb, 0xffefffbf, 0xfefffbff, 0xe3ff8ffe, 0x1ff87fe0, 0x7f81fe00},//0x60
			{0xfffbffef, 0xffbffeff, 0xfbffefff, 0xbffefffb, 0xffefffbf, 0xfefffbff, 0xe1ff87fe, 0x01f807e0, 0x01800600},//0x61
			{0xfffbffef, 0xffbffeff, 0xfbffefff, 0xbffe7ff9, 0xffe3ff8f, 0xfe1ff87f, 0xe07f81fe, 0x07f81fe0, 0x1f807e00},//0x62
			{0xfffbffef, 0xffbffeff, 0xfbffefff, 0xbffe3ff8, 0xffe07f81, 0xfe01f807, 0xe00f803e, 0x007801e0, 0x00800200},//0x63
			{0xfffbffe7, 0xff9ffe7f, 0xf9ffe3ff, 0x8ffe1ff8, 0x7fe1ff87, 0xfe07f81f, 0xe07f81fe, 0x07f81fe0, 0x1f807e00},//0x64
			{0x7ff9ffe3, 0xff8ffe1f, 0xf87fe07f, 0x81fe07f8, 0x1fe00f80, 0x3e00f803, 0xe007801e, 0x00180060, 0x00800200},//0x65
			{0xfc03f00f, 0x003c0080, 0x02000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},//0x66
			{0xffe3ff8f, 0xe03f80f0, 0x03c00000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},//0x67
			{0xfe03f80f, 0xc03f00f8, 0x03e00f00, 0x3c00c003, 0x00080020, 0x00000000, 0x00000000, 0x00000000, 0x00000000},//0x68
			{0xfff3ffcf, 0xfc3ff0ff, 0x03fc0fe0, 0x3f80f803, 0xe00c0030, 0x00000000, 0x00000000, 0x00000000, 0x00000000},//0x69
			{0xfe03f80f, 0xc03f00fc, 0x03f00f80, 0x3e00f003, 0xc00f003c, 0x00c00300, 0x0c003000, 0x80020000, 0x00000000},//0x6a
			{0xfffbffef, 0xffbffeff, 0xfbffefff, 0x3ffcff03, 0xfc0f803e, 0x00800200, 0x00000000, 0x00000000, 0x00000000},//0x6b
			{0xc003000e, 0x003800f0, 0x03c00f80, 0x3e00fc03, 0xf00fc03f, 0x00f803e0, 0x0f003c00, 0xe003800c, 0x00300000},//0x6c
			{0x7ff1ffc3, 0xfe0ff81f, 0xc07f00f8, 0x03e00700, 0x1c003000, 0xc0000000, 0x00000000, 0x00000000, 0x00000000},//0x6d
			{0x00000000, 0x00000000, 0x002e00c8, 0x04101140, 0x49017402, 0x20088000, 0x00000000, 0x00000000, 0x00000000},//0x6e
			{0x00000000, 0x00000000, 0x002e00c8, 0x04101140, 0x49017402, 0x20088000, 0x00000000, 0x00000000, 0x00000000},//0x6f
			{0xfffbffef, 0xffbffeff, 0xfbffefff, 0xbffefffb, 0xffefffbf, 0xfefffbff, 0xeffe3ff8, 0xffc3ff0f, 0xf03fc000},//0x70
			{0xfffbffef, 0xffbffeff, 0xfbffefff, 0xbffefffb, 0xffefffbf, 0xfefffbff, 0xeffc3ff0, 0xfe03f80e, 0x00380000},//0x71
			{0xfffbffef, 0xffbffeff, 0xfbffefff, 0xbffefffb, 0xffeffe3f, 0xf8ffc3ff, 0x0ff83fe0, 0xff03fc0f, 0xe03f8000},//0x72
			{0xfffbffef, 0xffbffeff, 0xfbffefff, 0xbffeffe3, 0xff8ff83f, 0xe0fe03f8, 0x0fc03f00, 0xf003c008, 0x00200000},//0x73
			{0xfffbffef, 0xffbffeff, 0xfbffeffe, 0x3ff8ffc3, 0xff0ffc3f, 0xf0ff83fe, 0x0ff83fe0, 0xff03fc0f, 0xe03f8000},//0x74
			{0xfffbffef, 0xfe3ff8ff, 0xc3ff0ff8, 0x3fe0ff03, 0xfc0fc03f, 0x00f803e0, 0x0f003c00, 0xe0038008, 0x00200000},//0x75
			{0x00f803e0, 0x03800e00, 0x08002000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},//0x76
			{0x3ff8ffe0, 0x1f807e00, 0x3800e000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},//0x77
			{0x01f807e0, 0x0f803e00, 0xf803e003, 0x800e0018, 0x00600080, 0x02000000, 0x00000000, 0x00000000, 0x00000000},//0x78
			{0x7ff9ffe0, 0xff83fe03, 0xf80fe01f, 0x807e00f8, 0x03e00180, 0x06000000, 0x00000000, 0x00000000, 0x00000000},//0x79
			{0x01f807e0, 0x0f803e00, 0xf803e00f, 0x803e0038, 0x00e00380, 0x0e001800, 0x60018006, 0x00080020, 0x00000000},//0x7a
			{0xfffbffef, 0xffbffeff, 0xfbffe7ff, 0x9ffe07f8, 0x1fe00f80, 0x3e000800, 0x20000000, 0x00000000, 0x00000000},//0x7b
			{0x00180060, 0x03800e00, 0x7801e00f, 0x803e00f8, 0x03e00f80, 0x3e00f803, 0xe007801e, 0x003800e0, 0x01800600},//0x7c
			{0x00000000, 0x00000000, 0x00000000, 0x00000300, 0x0c007001, 0xc00f803e, 0x01fc07f0, 0x3fe0ff87, 0xff1ffc00},//0x7d
			{0x00000000, 0x00000000, 0x002e00c8, 0x04101140, 0x49017402, 0x20088000, 0x00000000, 0x00000000, 0x00000000},//0x7e
			{0x00000000, 0x00000000, 0x002e00c8, 0x04101140, 0x49017402, 0x20088000, 0x00000000, 0x00000000, 0x00000000}//0x7f
		},
};

UINT32* get_char_from_g3(UINT8 charset, UINT8 character, UINT8 i)
{
   return((UINT32*)&TTX_G3_Font[charset][character][i]);
}

#endif
